package com.yj.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.yj.dao.TeacherDao;
import com.yj.model.Teacher;

@Repository("teacherDao")
public class TeacherDaoImpl extends BaseDaoImpl<Teacher> implements TeacherDao {

	@SuppressWarnings("unchecked")
	@Override
	public List<Teacher> queryByAcademyId(Integer aid) {
	    String hql = "from Teacher where academy_id=:acedemy_id";
	    return getSession().createQuery(hql).setParameter("acedemy_id", aid).list();
	}

}
